|
![](/i/fill.gif) |
"Chris B" <nom### [at] nomail com> wrote in message
news:4904d878$1@news.povray.org...
>
> "Leef_me" <nomail@nomail> wrote in message
> news:web.4904bd7445e043c998cd18890@news.povray.org...
>>
>> I want to apply a color map to a torus so that the maps are applied as
>> wedges
>> when viewing a cross-section of the torus.
>> (I think this would be radially, but I am unsure.)
>>
>> Can some give me a simple example of this?
>>
>> Thanks in advance.
>>
>> Leef_me
Or. To give you a pattern like a pie chart on the twin circular sections
through the torus, the only way I can think of is to build it up using cone
objects for textures rather than a color map. (I tried experimenting with
toroidal warp of a gradient and a radial texture, but failed to get anything
that mapped a color map in that way).
The following example builds a layered texture using planes and cones that
follows the circular path around the torus.
camera {location <0,2,-4> look_at 0}
light_source {<-1,5,-50>, rgb 1}
difference {
torus { 1, 0.4}
plane {z,0}
texture {pigment {rgb <1,1,1>}}
texture {
pigment {
object {
plane {y,0}
color rgb <1,1,0>
color rgbt 1
}
}
}
texture {
pigment {
object {
difference {
cone {0,1,y,1.5}
cone {0,1,y,0.5}
}
color rgbt 1
color rgb <1,0,0>
}
}
}
texture {
pigment {
object {
cone {0,1,-y,0.5}
color rgbt 1
color rgb <0,1,0>
}
}
}
}
Post a reply to this message
|
![](/i/fill.gif) |